-
Notifications
You must be signed in to change notification settings - Fork 8.2k
multi_heap: introduce support for realloc() #77183
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Hello @mkomet, and thank you very much for your first pull request to the Zephyr project! |
ce7dedb to
c241349
Compare
|
The logic is wrong. You shouldn't be using Also, the And... is there a reason why enlarging an allocation requiring that the The code could be simplified to something like this: |
Add support for realloc (and realloc_aligned) into the multi heap lib, where the buffer sent in will either be reused (maybe shrinked), or enlarged by allocating on any of the matching heaps of the multi heap. Signed-off-by: Meir Komet <[email protected]>
c241349 to
866e6e6
Compare
Duly, noted and I simplified the logic as you suggested. |
|
This pull request has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this pull request will automatically be closed in 14 days. Note, that you can always re-open a closed pull request at any time. |
|
Hi @mkomet! To celebrate this milestone and showcase your contribution, we'd love to award you the Zephyr Technical Contributor badge. If you're interested, please claim your badge by filling out this form: Claim Your Zephyr Badge. Thank you for your valuable input, and we look forward to seeing more of your contributions in the future! 🪁 |
Add support for realloc (and realloc_aligned) into the multi heap lib, where the buffer sent in will either be reused (maybe shrinked), or enlarged by allocating on any of the matching heaps of the multi heap.
See issue:
#77174